#include "BulletCollision/CollisionShapes/btTriangleMesh.h"
#ifdef __cplusplus
extern "C" {
#endif
btTriangleMesh* bullet_NewbtTriangleMesh(bool use32bitIndices,bool use4componentVertices){
	bool c_arg_use32bitIndices=use32bitIndices;
	bool c_arg_use4componentVertices=use4componentVertices;
	btTriangleMesh* wrap_out = new btTriangleMesh(c_arg_use32bitIndices,c_arg_use4componentVertices);
	return wrap_out;
}

void bullet_btTriangleMesh_addIndex(btTriangleMesh* c_this,int index){
	int c_arg_index=index;
	c_this->addIndex(c_arg_index);
}

void bullet_btTriangleMesh_addTriangle(btTriangleMesh* c_this,btVector3* vertex0,btVector3* vertex1,btVector3* vertex2,bool removeDuplicateVertices){
	btVector3 const& c_arg_vertex0=(btVector3 const&)(*vertex0);
	btVector3 const& c_arg_vertex1=(btVector3 const&)(*vertex1);
	btVector3 const& c_arg_vertex2=(btVector3 const&)(*vertex2);
	bool c_arg_removeDuplicateVertices=removeDuplicateVertices;
	c_this->addTriangle(c_arg_vertex0,c_arg_vertex1,c_arg_vertex2,c_arg_removeDuplicateVertices);
}

void bullet_btTriangleMesh_addTriangleIndices(btTriangleMesh* c_this,int index1,int index2,int index3){
	int c_arg_index1=index1;
	int c_arg_index2=index2;
	int c_arg_index3=index3;
	c_this->addTriangleIndices(c_arg_index1,c_arg_index2,c_arg_index3);
}

int bullet_btTriangleMesh_findOrAddVertex(btTriangleMesh* c_this,btVector3* vertex,bool removeDuplicateVertices){
	btVector3 const& c_arg_vertex=(btVector3 const&)(*vertex);
	bool c_arg_removeDuplicateVertices=removeDuplicateVertices;
	int c_out = c_this->findOrAddVertex(c_arg_vertex,c_arg_removeDuplicateVertices);
	int wrap_out = (c_out);
	return wrap_out;
}

double bullet_btTriangleMesh_GetFieldOfM_weldingThreshold(btTriangleMesh* c_this){
	return (double)(c_this->m_weldingThreshold);
}

int bullet_btTriangleMesh_getNumTriangles(btTriangleMesh* c_this){
	int c_out = c_this->getNumTriangles();
	int wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btTriangleMesh_getUse32bitIndices(btTriangleMesh* c_this){
	bool c_out = c_this->getUse32bitIndices();
	bool wrap_out = (c_out);
	return wrap_out;
}

bool bullet_btTriangleMesh_getUse4componentVertices(btTriangleMesh* c_this){
	bool c_out = c_this->getUse4componentVertices();
	bool wrap_out = (c_out);
	return wrap_out;
}

#ifdef __cplusplus
}
#endif
